/*
 *  Class name: PlayerDTO.java
 *  Version: 1.0
 *  Date: 30.10.2013
 */
package cz.muni.fi.pa165.soccergamesarchive.businesslayer.dtos;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import java.util.Objects;

/**
 * Data transfer object of entity class Player
 *
 * @author Michal Ďuriš
 */
@XStreamAlias(value = "player")
public class PlayerDTO {

    private Long id;

    private String firstName;

    private String LastName;

    private TeamDTO team = new TeamDTO();

    private int shirtNumber;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return LastName;
    }

    public void setLastName(String LastName) {
        this.LastName = LastName;
    }

    public int getShirtNumber() {
        return shirtNumber;
    }

    public void setShirtNumber(int shirtNumber) {
        this.shirtNumber = shirtNumber;
    }

    public TeamDTO getTeam() {
        return team;
    }

    public void setTeam(TeamDTO team) {
        this.team = team;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 67 * hash + Objects.hashCode(this.id);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final PlayerDTO other = (PlayerDTO) obj;

        return Objects.equals(this.id, other.id);
    }

    @Override
    public String toString() {
        return "PlayerDTO{" + "id=" + id + ", firstName=" + firstName
                + ", LastName=" + LastName + '}';
    }

}
